// 定义文本框

$(function(){
        $(".j-placeHolder").each(function(){  
        var t = $(this),
                input = t.find("input"),
                holder = t.find("span");
            input.focus(function() { 
                //holder.hide();
            }).blur(function() {
                if (input.val() === "") {
                    holder.show();
                } else {
                    holder.hide();
                }
            }).bind("keyup keydown", function() {
                if (input.val() === "") {
                    holder.show();
                } else {
                    holder.hide();
                }
            });
    })
    // logo
    var win=$(window);
    var brandLong=$(".brand-title-long");
    var brandShort=$(".brand-title-short");
    var winResize=function(){
        if(win.width() <= 1246){
            brandLong.hide();
            brandShort.show();
        }else{
            brandShort.hide();
            brandLong.show();
        }   
    }
    winResize();
    win.resize(winResize);
     
})

// checkAll复选框全选
$(".j-checkAll").bind("click",function(){
    var $checkEach=$(this).parents(".thead").next(".tbody").find(".j-checkEach");    
    if($(this).is(":checked")){
        $checkEach.prop("checked",true);
    }else{
        $checkEach.prop("checked",false);
    }
})

// 展开收起
$(".toggleSlide-tit").bind("click",function(){   
    $(this).next(".toggleSlide-body").slideToggle();
})